package com.yunwushanhe.exception;

import com.yunwushanhe.enums.AppHttpCodeEnum;
import lombok.Data;

/**
 * @Author 云雾山河
 * @Date 2023/8/10 14:35
 * 定义异常处理类
 */
@Data
public class BlogSystemException extends RuntimeException {

    private int code;
    private String msg;

    public BlogSystemException(AppHttpCodeEnum httpCodeEnum) {
        super(httpCodeEnum.getMsg());
        this.code = httpCodeEnum.getCode();
        this.msg = httpCodeEnum.getMsg();
    }
}
